#ifndef SIRI_H
#define SIRI_H

#include <QMutex>
#include <QTimer>
#include <QWidget>
#include "CApi.h"
#include "c/uart.h"
namespace Ui {
class Siri;
}

class Siri : public QWidget
{
    Q_OBJECT

public:
    explicit Siri(QWidget *parent = nullptr);
    void showSiri();
    void hideSiri();
    //functionFlag uart_flag=clear_data;
    void handWork();
    ~Siri();
signals:
    void siriTask(functionFlag flag);
private:
    Ui::Siri *ui;
    QTimer* m_pTimer=nullptr;
    int m_pTimeInterval=200;//ms

    QTimer siriLivingTimer;
    int siriLivingTime=14000;//ms
    void async_io_init(void);
};
void io_handler(int sig, siginfo_t *info, void *context);
#endif // SIRI_H
